package com.zuorenke.mybatis;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Z.R.K
 * @description
 * @create 2019-04-12 16:47:20
 **/
@Configuration
public class MyBatisInterceptorConfig {
	@Bean
	public String myInterceptor(SqlSessionFactory sqlSessionFactory) {
		PageLimitInterceptor pageLimitInterceptor = new PageLimitInterceptor();
		sqlSessionFactory.getConfiguration().addInterceptor(pageLimitInterceptor);
		return "interceptor";
	}
}
